/*******************************************************************************
 ** Name: agency.cpp                                                          **
 ** Description:                         **
 **                                                                           **
 ** Open Source Initiative (OSI) Approved License                             **
 **                                                                           **
 ** The contents of this file are subject to the terms of the                 **
 ** Common Development and Distribution License, Version 1.0 only             **
 ** (the "License").  You may not use this file except in compliance          **
 ** with the License.                                                         **
 **                                                                           **
 ** You can find a copy of the license in the LICENSE file within             **
 ** this distribution or at $WIKI/display/GOVT/License-software.              **
 ** Software distributed under the License is distributed on an "AS IS"       **
 ** basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.           **
 ** See the License for the specific language governing permissions           **
 ** and limitations under the License.                                        **
 **                                                                           **
 ** When distributing Covered Code, include this CDDL header in each          **
 ** file and include the License file at $GAME_DIR/LICENSE.                   **
 ** If applicable, add the following below this header, with the indicated    **
 ** fields enclosed by brackets "[]" replaced with your own identifying       **
 ** information: Portions Copyright [yyyy] [name of copyright owner]          **
 **                                                                           **
 ** Copyright (c) 2009-2011  Barry Gian James <gian@gamingods.net>            **
 ** All rights reserved.                                                      **
 **                                                                           **
 ** Ref: $HeadURL: https://govtsanct.svn.codeplex.com/svn/trunk/lib/agency.cpp $
 ******************************************************************************/
// Modified $Date: 2012-08-14 20:47:30 -0600 (Tue, 14 Aug 2012) $ by $Author: unknown $
#define  Agency_cpp_ID    "$Id: agency.cpp 69068 2012-08-15 02:47:30Z unknown $"

#include "common.hpp"
#include "agency.hpp"
//#include "character.hpp"

static std::string    stdGovtRanks[] =
{
    CSTR(GS-0),
    CSTR(GS-1), CSTR(GS-2), CSTR(GS-3), CSTR(GS-4), CSTR(GS-5),
    CSTR(GS-6), CSTR(GS-7), CSTR(GS-8), CSTR(GS-9), CSTR(GS-10),
    CSTR(GS-11), CSTR(GS-12), CSTR(GS-13), CSTR(GS-14), CSTR(GS-15),
    CSTR(GS-16), CSTR(SES-1), CSTR(SES-2), CSTR(SES-3), CSTR(SES-4),
    CSTR(SES-5)

};

static std::string stdMilRanks[] =
{
    CSTR(E-0),
    CSTR(E-1), CSTR(E-2), CSTR(E-3), CSTR(E-4), CSTR(E-5),
    CSTR(E-6), CSTR(E-7), CSTR(E-8), CSTR(E-9), CSTR(WO-1),
    CSTR(O-1), CSTR(O-2), CSTR(O-3), CSTR(O-4), CSTR(O-5),


    CSTR(O-6), CSTR(O-7), CSTR(O-8), CSTR(O-9), CSTR(O-10)
};

static std::string stdMarineRanks[] =
{
    CSTR(Recruit),
    CSTR(Private), CSTR(PFC), "Lance Corporal", "Corporal", "Sergeant",
    "Staff Sergeant", "Gunnery Sergeant", "Master Sergeant", "Sergeant Major",
    CSTR(Warrant),
    CSTR(2ndLT), CSTR(1stLT), "Captain", "Major", "Lt. Colonel",
    CSTR(Colonel), "Brigadier General", "Major General", "Lt. General",
    CSTR(General),
    CSTR(Commandant)
};

static std::string stdFrenchArmy[] =
{
    "Poilu",
    "Soldat de deuxième classe", "Soldat de première classe", "Caporal",
    "Caporal-chef", "Caporal-chef de première classe", "Élève sous-officier",
    "Sergent", "Sergent-chef", "Adjudant", "Major",
    "Sous-lieutenant", "	Lieutenant","Capitaine", "Commandant",
    "Lieutenant-colonel", "Colonel", "General de brigade",
    "General de division", "General de corps d'armee", "General d'armee"
};


/////////////////////////////////[ Agency
Agency::Agency(std::string n)
{
    name = n;
    vis = agency::visibility::common;
//    members[0] = members[1] = members[2] = 0;
    funds = 0;
    homeregion = agency::region::namerica;
    cover = "Green Tomato Plant Nursery";

}

void
Agency::AddNewAgent(Character & c)
{
	// FIXME memory leak. what is the purpose of this?
	AgencyRoster *	newAgent = new AgencyRoster();
//	newAgent->name = c.Name();
//	newAgent->lvl = c.Level();
////	newAgent->profession = c.Prof()->Name();
//	newAgent->dept = c.Dept();
}

void
Agency::AgentLogout(std::string n)
{
//	boost::intrusive::list<AgencyRoster>::iterator i(roster.begin()),
//			iend(roster.end());
//	for (; i != iend; ++i) {
//		if ((&*i)->name == n)
//			(&*i)->bOnline = false;
//	}
}

void
Agency::AgentLogin(std::string n)
{
//	boost::intrusive::list<AgencyRoster>::iterator i(roster.begin()),
//			iend(roster.end());
//	for (; i != iend; ++i) {
//		if ((&*i)->name == n)
//			(&*i)->bOnline = true;
//	}
}

std::string
Agency::StdFrenchRank(int r)
{
    return stdFrenchArmy[r];
}

std::string
Agency::StdMarineRanks(int r)
{
	return stdMarineRanks[r];
}

std::string
Agency::StdMilRanks(int r)
{
	return stdMilRanks[r];
}

std::string
Agency::StdGovtRanks(int r)
{
	return stdGovtRanks[r];
}


Agency::~Agency()
{

}

